package org.gardenXml.life;

public class User {
    private String name;

    public User() {
        System.out.println("1.无参数构造");
    }

    public User(String name) {
        this.name = name;
    }

    public void initMethod() {
        System.out.println("3.初始化方法");
    }
    public void destroyMethod() {
        System.out.println("4.销毁方法");
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        System.out.println("2.给bean对象设置属性");
        this.name = name;
    }
}
